home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / comm / fido / Rock_1_5.lha / ROCK / bossoutbound.rexx < prev    next >
OS/2 REXX Batch file  |  1995-05-11  |  996b  |  43 lines

  1. /*
  2.              Rock v1.5 - Fidonet mailer for point systems
  3.                  Copyright (C) 1995  Jean-Marc Xiume'
  4.          This software is distributed under the terms of the
  5.     GNU General Public License. Read "license.doc" for more details.
  6.  
  7. ********** rename boss outbound files to match remote address **********
  8. */
  9.  
  10. options results
  11. options failat 99
  12.  
  13. Parse upper arg od ha ra .
  14.  
  15. parse var ha hd "#" hz ":" hn "/" hf "." hp .
  16. parse var ra rd "#" rz ":" rn "/" rf "." rp .
  17.  
  18. if hd||hz||hn||hf = rd||rz||rn||rf then exit 0
  19.  
  20. id=pragma('ID')
  21.  
  22. Address COMMAND 'LIST >T:f'id od||hz'.'hn'.'hf'.'0'.??? quick nohead'
  23. if word(statef("T:f"id),2)=0 then return 0
  24. if ~open('fl',"T:f"id,'R') then return 0
  25.  
  26. do while ~eof('fl')
  27.   L=Upper(strip(ReadLn('fl'),'B'))
  28.   if L="" then iterate
  29.  
  30.   parse var L x '.' x '.' x '.' x '.' ex
  31.   drop x
  32.  
  33.   sx=right(ex,2)
  34.   if sx="LO"|sx="UT"|ex="REQ" then do
  35.     Address COMMAND 'rename 'od||L' 'od||rz'.'rn'.'rf'.0.'ex
  36.   end
  37. end
  38.  
  39. v=close('fl')
  40. v=delete('T:f'id)
  41.  
  42. exit 0
  43.